/*
 * This file is part of ksPlatform
 * 
 * Copyright (c) 2014-2015
 * 
 * This file is dual-licensed under the AGPLv3 (http://www.gnu.org/licenses/agpl-3.0.html) 
 * 
 * If you are unsure which license is appropriate for your use, please contact the sales department
 * at 97041437@qq.com.
 */

package cn.com.ksplatform.modules.system.auth.dictmanager.model;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.fasterxml.jackson.annotation.JsonIgnore;
import org.hibernate.annotations.GenericGenerator;

import cn.com.ksplatform.base.BaseModel;

/**
 * @ClassName:PlatDictItem <br/>
 * @deprecated:TODO. <br/>
 * @Date: 2015年5月25日 上午10:19:39 <br/>
 * 
 * @author Mr.Luoxing
 * @version 1.0
 */
@Entity
@Table(name = "t_sys_dictitem")
public class PlatDictItem extends BaseModel implements Comparable<PlatDictItem> {
	@Id
	@GenericGenerator(name = "systemUUID", strategy = "uuid")
	@GeneratedValue(generator = "systemUUID")
	private String itmeId;
	private Integer sort;
	private String ekey;
	private String eval;
	private String remark1;
	private String remark2;
	private String remark3;
	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(name = "dictType")
	@JsonIgnore
	private PlatDictType dictType;
	
	public String getItmeId() {
		return itmeId;
	}

	public void setItmeId(String itmeId) {
		this.itmeId = itmeId;
	}

	public Integer getSort() {
		return sort;
	}

	public void setSort(Integer sort) {
		this.sort = sort;
	}

	public String getEkey() {
		return ekey;
	}

	public void setEkey(String ekey) {
		this.ekey = ekey;
	}

	public String getEval() {
		return eval;
	}

	public void setEval(String eval) {
		this.eval = eval;
	}

	public PlatDictType getDictType() {
		return dictType;
	}

	public void setDictType(PlatDictType dictType) {
		this.dictType = dictType;
	}

	public String getRemark1() {
		return remark1;
	}

	public void setRemark1(String remark1) {
		this.remark1 = remark1;
	}

	public String getRemark2() {
		return remark2;
	}

	public void setRemark2(String remark2) {
		this.remark2 = remark2;
	}

	public String getRemark3() {
		return remark3;
	}

	public void setRemark3(String remark3) {
		this.remark3 = remark3;
	}

	@Override
	public int compareTo(PlatDictItem arg0) {
		return this.getSort().compareTo(arg0.getSort());
	}
	
	
}
